﻿namespace GoFun.Lib

open GoFun.Lib.Positionen

module Freiheiten =
    
    let fürSteinAuf (brett : Brett) (position : Position) : int =
        let dim = brettDim brett
        let istFrei (pos : Position) =
            positionStatus pos brett = PositionStatus.Empty
        let freiePositionen = 
            surrounding dim position 
            |> List.filter istFrei
        List.length freiePositionen
